<template>
  <div>
    <div>sum:{{ count }}</div>
    <div>doubleCount:{{ doubleCount }}</div>
    <div><button @click="counterStore.increment">add</button></div>
  </div>
</template>
<script setup lang="ts">
import { useCounterStore } from '@/stores/counter'
import { storeToRefs } from 'pinia'

const counterStore = useCounterStore()
console.log(storeToRefs(counterStore))
console.log(counterStore)

const { count, doubleCount } = storeToRefs(counterStore)
</script>

<style lang="scss" scoped></style>
